home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / ZIPPED / DOS / EDITORS / STAT10.ZIP / STAT.DOC < prev    next >
Text File  |  1992-08-26  |  16KB  |  344 lines

  1. NOTE:  THIS FILE CONTAINS LINES OVER 80 CHARACTERS.  IF YOU TRY TO EXAMINE
  2. THIS FILE WITH SOME SOFTWARE, THE LONG LINES WILL WRAP AROUND AND BE HARD
  3. TO READ.
  4.  
  5. STAT by Kirk Barrett Software Engineering copyright 1992
  6.  
  7. STAT is a program which reads a text file containing columns of numbers and
  8. calculates statistics on them (count, sum, average, standard deviation,
  9. last value, maximum, minimum, range and line number of maxium and minimum),
  10. based on specifications in a control file, and writes the results to an
  11. output file.
  12.  
  13. QUICK START FOR THOSE WHO WON'T READ A FOUR PAGE MANUAL
  14.  
  15. Look at the sample input, control and output files.  You should be able to
  16. figure out the control file from the example.  To create a new control
  17. file, copy the sample to a new name and edit it.  Execute the program by
  18. typing the following from the DOS prompt:
  19.  
  20.                            STAT <control file> 
  21.  
  22. EXPLANATION OF SHAREWARE
  23.  
  24. This program is Shareware.  It is not free.  If, after trying out the
  25. program, you decide to continue to use it, you are obligated to purchase 
  26. the program for $10 from the program's author, Kirk Barrett Software
  27. Engineering, by completing and mailing the following registration form.
  28. Your support is important and greatly appreciated. With it, Shareware
  29. authors are encouraged to design and distribute new products.  Without it,
  30. a great deal of high quality, low cost software will cease to be available.
  31.  
  32. You are encouraged to copy the programs WITH supporting files and share
  33. them freely with others.  You have the luxury of trying out the complete
  34. programs, at your own pace and in the comfort of your own home or
  35. workplace.  This is not a crippled or "demo" copy, but the complete working
  36. version of the program.
  37.  
  38. Why you should pay:
  39.    * You will receive a disk with our two other shareware programs,
  40.      APPNDLXL and 123IMPRT, plus a bunch of freeware (see below for a more
  41.      thorough explanation)
  42.    * Technical support - via mail or Compuserve
  43.    * Notification of updates and new products
  44.    * Inexpensive upgrade offers or other deals for registered users only
  45.    * Your input and ideas help shape future products
  46.    * A sense of pride and ownership, in having honestly participated in the
  47.      Shareware revolution
  48.    * You help to keep software prices down, by supporting a      
  49.      distribution method which doesn't rely on expensive advertising
  50.      campaigns.
  51.  
  52. Be aware of the following restrictions, designed to protect the community
  53. of Shareware users and authors, and to prevent greedy people from taking
  54. unfair advantage of the trust, hard work, and good will of Shareware
  55. authors:
  56.  
  57. 1. No price or other consideration may be charged for distribution.
  58. However, a distribution cost may be charged for the cost of the diskettes,
  59. shipping, and handling, not to exceed $7 total (equivalent U.S. dollars).
  60.  
  61. 2. The files and programs on the disks may not be modified nor deleted.
  62.  
  63. 3. The programs cannot be sold as part of some other more inclusive
  64. package.
  65.  
  66. 4. The programs cannot be "rented" or "leased" to others.
  67.  
  68.  
  69. WARRANTY
  70.  
  71. There is no warranty of any kind, and the copyright owner is not liable for
  72. damages of any kind.  By using this software, you agree to these terms.
  73.  
  74. The software and documentation are copyright 1992 by
  75.  
  76.           Kirk Barrett Software Engineering
  77.           179 Westgate Dr.
  78.           Elgin, IL 60123
  79.  
  80. SHAREWARE SOFTWARE BY KIRK BARRETT SOFTWARE ENGINEERING
  81.  
  82. 123IMPRT-- reads a text file and creates a Lotus-importable file (a "comma
  83. and quote delimited" file) according to a template which you specify. 
  84. Works much better than the PARSE command in LOTUS or other spreadsheets.
  85.  
  86. PARSE-- "quick and dirty" way to create a Lotus-importable file.
  87.  
  88. APPDNLXL-- APPNDLXL reads up to 10 text files and appends them "line by
  89. line", with several options, into a new output file.  It is useful for
  90. manipulating columnar reports.  For example, you could merge two day-by-day
  91. reports into one file, extracting only the columns of interest, or you
  92. could  rearrange or delete columns within one report.
  93.  
  94. STAT-- reads a text file containing columns of numbers and computes
  95. statistics on them (sum, average, standard deviation, count, maximum and
  96. minimum).
  97.  
  98. If you purchase any of these products, you will receive unregistered copies
  99. of the others, plus the following for FREE:
  100.  
  101.      o    READSCRN-- reads the current screen and saves it to a file.
  102.      o    LASRHELP-- a package of batch files which facilitates control
  103.           over a HP Laser Jet (set margins, orientation, lines per inch,
  104.           lines per page and more).
  105.      o    ASCII-- displays all characters and their ASCII codes on one
  106.           screen.
  107.      o    GRAFCHAR-- displays all graphic characters and their ASCII codes
  108.           in an easy-to-read format.
  109.      o    FIXFILE-- reads any input file and replaces all non-text
  110.           characters with blanks.
  111.  
  112.  
  113.  
  114.                           STAT Registration Form
  115.            Copyright (c) 1992, Kirk Barrett Software Engineering
  116.  
  117.  
  118.         Please make checks payable and mail to:
  119.  
  120.               Kirk R. Barrett
  121.               179 Westgate Dr.
  122.               Elgin, IL
  123.  
  124.                         STAT Registration Fee: $10
  125.  
  126.                      Name: _____________________________________________
  127.  
  128.  
  129.              Company Name: _____________________________________________
  130.  
  131.         Mailing Address
  132.  
  133.                    Street: _____________________________________________
  134.  
  135.  
  136.         Town, State & Zip: _____________________________________________
  137.  
  138.  
  139.                     Phone: ____________________________________________
  140.  
  141.  
  142.         Do you have a modem? ______________      Disk format  ____ 3.50"
  143.  
  144.                                                               ____ 5.25"
  145.  
  146.         Where did you receive STAT from?  (Just curious.)
  147.         Any comments or suggestions for this or other programs?:
  148. EXPLANATION OF STAT
  149.  
  150. STAT is a program which reads a text file containing columns of numbers and
  151. calculates statistics on them (count, sum, average, standard deviation,
  152. last value, maximum, minimum, range and line number of maxium and minimum). 
  153. The results are written to an output file.  A third file, called the
  154. control file, specifies which statistics you want calculated and the
  155. columns in which the numbers will appear in the input file.
  156.  
  157. You run the program from the DOS prompt by entering
  158.  
  159.                            STAT <control file> 
  160.  
  161. You should create the control file in a text editor or word processor,
  162. saving it as a text or ASCII file.  Let me present a sample input file,
  163. control file and output file first, and then explain the lines in the
  164. control file one by one.
  165.  
  166. SAMPLE INPUT FILE
  167.  
  168. (The first two rows of numbers are not part of the file; they are provided
  169. as a guide to determine the columns devoted to each field.)
  170.  
  171.                  
  172.          1         2         3         4         5
  173. 12345678901234567890123456789012345678901234567890
  174.                              Hi          Lo
  175.            Rainfall Temperature Temperature
  176.        Day   inches       Deg F       Deg F
  177.   07/01/91                   80          60
  178.   07/02/91                   81          61
  179.   07/03/91      0.5          78          58
  180.    .             .            .           .
  181.    .             .            .           .
  182.    .             .            .           .
  183.   07/27/91      0.3          91          71
  184.   07/28/91                   85          65
  185.   07/29/91                   75          55
  186.   07/30/91                   73          53
  187.   07/31/91                   71          51
  188.  
  189.  
  190. SAMPLE CONTROL FILE
  191.  
  192.                                                                                                    1         1         1         1         1         1         1         1         1
  193.          1         2         3         4         5         6         7         8         9         0         1         2         3         4         5         6         7         8
  194. 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
  195. INPUT FILE          weather.txt
  196. OUTPUT FILE         output
  197. START LINE          4
  198. END LINE                  
  199. NUM HEADERS         3
  200.                                       Hi        Lo
  201.                       Rainfall      Temp      Temp
  202.                         inches     Deg F     Deg F
  203.  
  204. STATISTIC SPECIFICATIONS
  205. *                        Start     Field       Low        Hi    Multi-                                                  |--Last--|          |Line# of|          |Line# of|
  206. *                          Col     Width Threshold Threshold    plier   Constant|--Count-||---Sum--||---Avg--||-StdDev-||-Value--||-Maximum||-Maxium-||-Minimum||-Minimum||--Range-|
  207. Rainfall                    14         7                                           ###,###  #####.##                      #####.##  #####.##  ####,###  #####.##  ####,###  #####.##
  208. Hi Temp                     25         7                                           ###,###            #####.##  #####.##  ########  ########  ####,###  ########  ####,###  ########
  209. Lo Temp                     38         7                                           ###,###            #####.##  #####.##  ########  ########  ####,###  ########  ####,###  ########
  210. DONE
  211.  
  212.  
  213. SAMPLE OUTPUT FILE
  214.          1         2         3         4         5         6
  215. 123456789012345678901234567890123456789012345678901234567890
  216.  
  217.                                       Hi        Lo
  218.                       Rainfall      Temp      Temp
  219.                         inches     Deg F     Deg F
  220. Count:                       8        31        31
  221. Sum:                      4.50          
  222. Average:                           83.19     63.19
  223. Std Dev:                            7.27      7.27
  224. Last Value:               0.30        71        51
  225. Max:                      1.20        95        75
  226. Line # of Max:              22        18        18
  227. Min:                      0.20        69        49
  228. Line # of Min:               8        17        17
  229. Range:                    1.00        26        26
  230. EXPLANATION OF THE CONTROL FILE
  231.  
  232. The general format for a line in the control file is a keyword in columns
  233. 1-20 and a data item starting in column 21.  The lines MUST appear in the
  234. order shown in the sample.  Blank lines and  comment lines (lines beginning
  235. with a "*") can appear anywhere in the control file.
  236.  
  237. The first line in the control file specifies the input file, ie, the text
  238. file with columns of numbers.  The second line specifies, the output file,
  239. ie, file to which the statistics will be written.  The next two lines
  240. specify the line number in the input file at which to start and end
  241. calculation of the statistics.  If you want to include all the lines
  242. through the end of the file, leave the end line value field blank. 
  243. Specifying a start line of other than 1 or a non-blank end line allows you
  244. to calculate statistics on only part of a file. 
  245.  
  246. The next line specifies the number of header lines you want to write at the
  247. top of the output file.  The statistics for a column in the input file will
  248. be written in a vertically aligned columned in the output file.  Columns 
  249. 1-20 in the output file are reserved for statistic descriptions. Therefore,
  250. you should specify headers for the statistic columns beginning in column
  251. 21.  Each statistic in the output file will be right-justified in a 10
  252. character wide field, so the column header should also be right justified
  253. in a 10-character field.  Refer to the samples above and the discussion
  254. below on "statistic specification" and output lines for more explanation.
  255.  
  256. Immediately following the "NUM HEADERS" line, you should include the actual
  257. headers lines that will go into the output file.  
  258.  
  259. Following the header lines comes a line containing only the keyword
  260. STATISTIC SPECIFICATIONS.  Following this line, comes an indefinite number
  261. of "statistic specification" lines, each line specifying a field in the
  262. input file and the statistics to calculate on this field.
  263.  
  264. FIELDS IN THE STATISTIC SPECIFICATION LINES
  265.  
  266. Each line starts with a field description in columns 1-20.  This
  267. description is not used by the program.  The rest of the line contains a
  268. number of fields, starting in column 21 and continuing through column 180,
  269. with each field 10 columns wide.  You may have to issue some special
  270. formatting commands to accommodate a line 180 columns long in your text
  271. editor or word processor.
  272.  
  273. The next two fields of the statistic specification line specify the column
  274. (ie, number of characters from the start of the line) in which the column
  275. of numbers starts in the input file, and the field width (in number of
  276. characters).  
  277.  
  278. The next two fields specify a high and low threshold for values to be
  279. included in the statistics.  If a value in the input file for this field is
  280. outside these thresholds, it will not be included in the statistic
  281. calculations.  If you want to include all values, leave the threshold
  282. fields blank.
  283.  
  284. The next two fields specify a multiplier and a constant which allow you to
  285. convert the input values to a different unit.  The value in the input file
  286. will be multiplied by the multiplier and then the constant will be added to
  287. the result.  For example, if your input file contained a column of
  288. temperature in centigrade and you wanted to convert to Fahrenheit, you
  289. would specify a multiplier of 1.8 and a constant of 32.  If you do not want
  290. to convert the values, leave the multiplier and constant fields blank.
  291.  
  292. Next comes a series of fields which specify which statistics you want to
  293. calculate for this column.  If a field is left blank, then the statistic
  294. will not be calculated for this column.  If you do want the statistic
  295. calculated, you should "activate" it by specifying the format in which you
  296. want the value to appear in the output file.  The format is specified as in
  297. the BASIC programming language.  Put a pound sign (#) for each digit you
  298. want printed.  You can also include commas and a dollar sign.  For example,
  299. if you estimate the value of the statistic would be about to 10,000 and you
  300. wanted 2 digits to the right of the decimal point, you would specify the
  301. format as ##,###.##.  The format should be right justified in the field.
  302.  
  303. Include a statistic specification line for each column in the input file on
  304. which you want to calculate statistics.  End the series of statistic
  305. specification lines with a line containing DONE in columns 1-4.
  306.  
  307. OUTPUT FILE
  308.  
  309. The output file begins with the header lines that were specified in the
  310. control file.  These are followed by the statistics themselves, one
  311. statistic per line.  Each line begins with a statistic description in
  312. columns 1-20.  The statistics themselves appear in 10-character wide fields
  313. starting in column 21.  If a statistic was not "activated" (ie, the field
  314. was left blank in the statistic specification line), then the statistic
  315. field will be left blank (eg, in the samples above, for rainfall, average
  316. and standard deviation were not activated, so these field were left blank
  317. in the  rainfall column of the output file).
  318.  
  319. The columns in the output file appear in the same order as the statistic
  320. specification lines appear in the control file. 
  321.  
  322. If a line in the input file contains a non-numeric value or all blanks, 
  323. then the value will not be included in the calculation of the count,
  324. average or standard deviation of that column. 
  325.  
  326. CREATING A CONTROL FILE
  327.  
  328. The best way to create a control file is to copy an old control file to a
  329. new name and then edit the new file.  Since any lines after the "DONE" line
  330. are ignored, you can include a small portion of the input file at the
  331. bottom of the control file to help you determine the starting column and
  332. field width of the fields in the input file.  
  333.  
  334. EXAMPLE FILES
  335.  
  336. The above example files are included as CONTROL, WEATHER.TXT and OUTPUT.
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.